<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="https://files.cnblogs.com/files/nnnnn/nncss.css" type="text/css" />
    <style>
       #nn-canvas {
           height: 500px;
       }
    </style>
</head>
<body>
    <div class="container">
        <div id="nn-canvas" class="row nnp-mt2 nnb nnc-gray"></div>
    </div>
    <script src="http://git.oschina.net/60/nnCssFramework/raw/master/nnutils.js"></script>
    <script>
        window.onload = function() {
            nnCanvas.draw = function(ctx, w, h){
                ctx.moveTo(w/10, h/10);
                ctx.lineTo(w - 10, h - 20);
                ctx.lineWidth = 5;
                ctx.strokeStyle = 'red';
                ctx.stroke();
            };
            nnCanvas.render();
        }
    </script>
</body>
</html>